<template>
  <div>
    <!-- <van-tabs @click-tab="onClickTab" title-active-color="#ff5f16" line-width="80px" line-height="2px" color="#ff5f16" >
      <van-tab v-for="(t, index) in selectedMovie.showDate" :key="index" :title="Data(t)"></van-tab>
    </van-tabs> -->
    
      <div class="schedule-list">
      <div v-for="(t,index) in Scheduling" :key="index">
        <div class="disable schedule-item">
          <div class="left" >
            <div class="start-at">{{new Date(t.showAt * 1000).getHours()}}:{{new Date(t.showAt * 1000).getMinutes()}}</div>
            <div class="end-at">{{new Date(t.endAt * 1000).getHours()}}:{{new Date(t.endAt * 1000).getMinutes()}}散场</div>
          </div>
          <div class="middle">
            <div class="language">{{t.filmLanguage}}{{t.imagery}}</div>
            <div class="hall">{{t.hallName}}</div>
          </div>
          <div class="right">
            <div class="lowest-price">
              <span class="price-icon">￥</span>
              <span class="jiage">{{t.salePrice/100}}</span>
            </div>
            <div class="buy-ticket">购票</div>
          </div>    
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { reactive, toRefs } from '@vue/reactivity'
import { onMounted } from '@vue/runtime-core';
import { FilmSchedulingAPI } from '@/api/index.js'
import { useStore } from 'vuex';
export default {
  props:['timeAt'],
  setup(props) {
    const root = reactive({
      Scheduling:[],//电影排期
    });

    const store = useStore();
     const FilmScheduling = async ()=>{
      const { data:res } = await FilmSchedulingAPI({id:5941,cinemaId:2800,data:1650729600});
      root.Scheduling = res.data.schedules
   }
  

  
  
   onMounted(()=>{
    
     FilmScheduling()
   })

   return{
     ...toRefs(root),
   
   }
  }
}
</script>

<style lang="less" scoped>
.schedule-list {
  min-height: calc(100vh - 44px);

  .schedule-item {
    border-bottom: 1px solid #ededed;
    height: 74px;
    padding: 15px 15px;
    background: #fff;
    justify-content: space-between;
    display: flex;
    .left {
      width: 84px;
      .start-at {
        font-size: 15px;
        color: #191a1b;
      }
      .end-at {
        font-size: 13px;
        color: #797d82;
        margin-top: 2px;
      }
    }
    .middle {
      width: calc(100% - 210px);
      .language {
        font-size: 15px;
        color: #191a1b;
      }
      .hall {
        font-size: 13px;
        color: #797d82;
        margin-top: 2px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }

    .right {
      display: flex;
      color: #ff5f16;
      padding: 10px 0;
      line-height: 25px;
      .lowest-price {
        padding-right: 20px;
        font-size: 15px;
        .price-icon {
          font-size: 10px;
        }
        .jiage {
          font-size: 15px;
        }
      }
      .buy-ticket {
        height: 25px;
        width: 50px;
        border-radius: 2px;
        text-align: center;
        border: 1px solid #ff5f16;
        font-size: 12px;
      }
    }
  }
}
</style>